﻿Public Class Questionaire
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub btn_cities_Click(sender As Object, e As EventArgs) Handles btn_cities.Click

        If lbl_cities.Text = IsRight(lbl_cities) Then
            lbl_cities.Text = "Well Done"
        Else : lbl_cities.Text = "Sorry"
        End If

    End Sub

    Function getSelectedItems(ByVal myCheckboxList As CheckBoxList)
        Dim s As String
        For i = 0 To myCheckboxList.Items.Count - 1
            If myCheckboxList.Items(i).Selected = True Then
                s = s & myCheckboxList.Items(i).Text & <br/>
            End If
        Next
        Return s
    End Function

    Function IsRight(ByVal myCheckBoxList As CheckBoxList)
        For i = 0 To myCheckBoxList.Items.Count - 1
            If myCheckBoxList.Items(i).Value = "*" And myCheckBoxList.Items(i).Selected = False Then
                Return False
            End If
            If myCheckBoxList.Items(i).Value <> "*" And myCheckBoxList.Items(i).Selected = True Then

            End If
        Next
        Return True
    End Function

    Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

    End Sub
End Class